package com.mvu.banana.internal.generated;

import static com.mvu.banana.common.validation.Validator.*;
import com.mvu.banana.internal.client.RunBox;
import com.mvu.banana.common.client.ValueDTO;

public class RunBoxDTO extends ValueDTO<RunBox>{
  public String input;
  public String console;
  public String[] Suggestions;
  
  public RunBoxDTO(){
  }
  
  public void prepare(RunBox p0){
    p0.input.setName("input");
  }
  
  public boolean validate(RunBox p0){
    boolean isValid = true;
    boolean inputIsValid = isLength(input, 1, 100);
    p0.highlight(p0.input, inputIsValid);
    isValid &= inputIsValid;
    return isValid;
  }
  
  public void update(RunBox p0){
    p0.console.setValue(this.console);
    p0.setSuggestions(this.Suggestions);
  }
  
  public void copy(RunBox p0){
    this.input = p0.input.getValue();
  }
  
  public String toString(){
    StringBuilder builder = new StringBuilder();
    builder.append("input=").append(this.input).append(", ");
    return builder.toString();
  }
}